package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.List;

/**
 * 属性值
 */
@Entity
public class Ability {
    private int abilityId;
    private String abilityName;
    private List<ProDetail> proDetails;

    private Attribute attribute; // 属性

    @ManyToMany(mappedBy = "abilities")
    public List<ProDetail> getProDetails() {
        return proDetails;
    }

    public void setProDetails(List<ProDetail> proDetails) {
        this.proDetails = proDetails;
    }

    @ManyToOne
    @JoinColumn(name = "attr_id")
    public Attribute getAttribute() {
        return attribute;
    }

    public void setAttribute(Attribute attribute) {
        this.attribute = attribute;
    }

    @Id
    @Column(name = "ability_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getAbilityId() {
        return abilityId;
    }

    public void setAbilityId(int abilityId) {
        this.abilityId = abilityId;
    }

    @Basic
    @Column(name = "ability_name", nullable = true, length = 0)
    public String getAbilityName() {
        return abilityName;
    }

    public void setAbilityName(String abilityName) {
        this.abilityName = abilityName;
    }


}
